<?php
include_once 'config.inc.php';
include_once 'oauth-php/library/OAuthStore.php';
 
$store = OAuthStore::instance('MySQL', $dbOptions);
 
// 当前用户的ID, 必须为整数
$user_id = 1;
 
// 服务器描述信息
$server = array(
    'consumer_key'      => '07be533fdd42a946e214a1a487b8943704f4c9501',
    'consumer_secret'   => 'fb4c7f6a36f7941ce311d63dbf46c383',
    'server_uri'        => 'http://localhost/oauthphp/',
    'signature_methods' => array('HMAC-SHA1', 'PLAINTEXT'),
    'request_token_uri' => 'http://localhost/oauthphp/request_token.php',
    'authorize_uri'     => 'http://localhost/oauthphp/authorize.php',
    'access_token_uri'  => 'http://localhost/oauthphp/access_token.php'
);
 
// 将服务器信息保存在 OAuthStore 中
$consumer_key = $store->updateServer($server, $user_id);
?>